<!DOCTYPE html>
<html>
<head>
  <title>CStore</title>
  <%= stylesheet_link_tag    "bootstrap", :media => "all" %>
  <%= javascript_include_tag "bootstrap" %>
  <%= csrf_meta_tags %>

  <style type="text/css">
  /* Customize the navbar links to be fill the entire space of the .navbar */
      .navbar .navbar-inner {
        padding: 0;
      }
      .navbar .nav {
        margin: 0;
        display: table;
        width: 100%;
      }
      .navbar .nav li {
        display: table-cell;
        width: 1%;
        float: none;
      }
      .navbar .nav li a {
        font-weight: bold;
        text-align: center;
        border-left: 1px solid rgba(255,255,255,.75);
        border-right: 1px solid rgba(0,0,0,.1);
      }
      .navbar .nav li:first-child a {
        border-left: 0;
        border-radius: 3px 0 0 3px;
      }
      .navbar .nav li:last-child a {
        border-right: 0;
        border-radius: 0 3px 3px 0;
      }

      /* Sticky footer styles
      -------------------------------------------------- */

      html,
      body {
        height: 88%;
        /* The html and body elements cannot have any padding or margin. */
      }

      /* Wrapper for page content to push down footer */
      #wrap {
        min-height: 100%;
        height: auto !important;
        height: 100%;
        /* Negative indent footer by it's height */
        margin: 0 auto -60px;
      }

      /* Set the fixed height of the footer here */
      #push,
      #footer {
        height: 60px;
      }
      #footer {
        background-color: #f5f5f5;
      }
  </style>
</head>
<body>
	<div class="container">
		<div class="masthead">
			<h1 class="muted">CStore <%= link_to "home", '/' %>
        <small class="pull-right"><%= link_to "登录", '#' %>&middot;<%= link_to "注册", '/users/new' %></small></h1><!-- 网站标志，可改为使用图片 -->

			<!-- 导航栏 -->
			<div class="navbar">
				<div class="navbar-inner">
					<div class="container">
						<ul class="nav" role="navigation">
							<li class="dropdown active">
                      		<a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">所有分类 <b class="caret"></b></a>
                      		<ul class="dropdown-menu" role="menu" aria-labelledby="drop1">
                            <% find_sort_to_display %>
                              <% @sorts.each do |s| %>
                                <li><%= link_to s.sort_name, s %></li><!-- 链接到对应的分类 -->
                              <% end %>
                      		</ul></li><!-- dropdown -->
							<li><%= link_to "新品推荐", '#' %></li>
							<li><%= link_to "活动专区", '#' %></li>
							<li><%= link_to "图片墙", '#' %></li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div id="wrap">
		<div class="container">
			<%= yield %>
		</div>		
		<div id="push"></div>
	</div>

	<hr>
	<footer class="footer">
		<div class="container">
     		<p class="pull-right"><%= link_to "返回顶部", '#' %></p>
     		<p class="muted credit">&copy; Coki Lee 2013
        	<%= link_to "关于我们", '#' %> &middot;
        	<%= link_to "联系我们", '#' %> &middot;
        	<%= link_to "意见反馈", '#' %> 
      		</p>
    </div>
	</footer>
  <div class="hero-unit">
    <%= debug(params) if Rails.env.development? %>
  </div>

<!-- load the javascript -->
<%= javascript_include_tag "jquery" %>
<%= javascript_include_tag "bootstrap-dropdown" %>

</body>
</html>